home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
source
/
amiga
/
Console.mod
< prev
next >
Wrap
Text File
|
1995-06-29
|
4KB
|
159 lines
(***************************************************************************
$RCSfile: Console.mod $
Description: Interface to console.device
Created by: fjc (Frank Copeland)
$Revision: 3.8 $
$Author: fjc $
$Date: 1995/06/04 23:13:14 $
Includes Release 40.15
(C) Copyright 1985-1993 Commodore-Amiga, Inc.
All Rights Reserved
Oberon-A interface Copyright © 1994-1995, Frank Copeland.
This file is part of the Oberon-A Interface.
See Oberon-A.doc for conditions of use and distribution.
***************************************************************************)
<* STANDARD- *>
MODULE [2] Console;
IMPORT
SYS := SYSTEM, e := Exec, ie := InputEvent, km := KeyMap, u := Utility;
(*
** $VER: console.h 36.11 (7.11.90)
**
** Console device command definitions
*)
CONST
(****** Console commands ******)
askKeyMap * = e.nonstd+0;
setKeyMap * = e.nonstd+1;
askDefaultKeyMap * = e.nonstd+2;
setDefaultKeyMap * = e.nonstd+3;
(****** SGR parameters ******)
primary * = 0;
bold * = 1;
italic * = 3;
underscore * = 4;
negative * = 7;
normal * = 22; (* default foreground color, not bold *)
notItalic * = 23;
notUnderscore * = 24;
positive * = 27;
(* these names refer to the ANSI standard, not the implementation *)
black * = 30;
red * = 31;
green * = 32;
yellow * = 33;
blue * = 34;
magenta * = 35;
cyan * = 36;
white * = 37;
default * = 39;
blackBg * = 40;
redBg * = 41;
greenBg * = 42;
yellowBg * = 43;
blueBg * = 44;
magentaBg * = 45;
cyanBg * = 46;
whiteBg * = 47;
defaultBg * = 49;
(* these names refer to the implementation, they are the preferred *)
(* names for use with the Amiga console device. *)
clr0 * = 30;
clr1 * = 31;
clr2 * = 32;
clr3 * = 33;
clr4 * = 34;
clr5 * = 35;
clr6 * = 36;
clr7 * = 37;
clr0Bg * = 40;
clr1Bg * = 41;
clr2Bg * = 42;
clr3Bg * = 43;
clr4Bg * = 44;
clr5Bg * = 45;
clr6Bg * = 46;
clr7Bg * = 47;
(****** DSR parameters ******)
dsrCpr * = 6;
(****** CTC parameters ******)
ctcHSetTab * = 0;
ctcHClrTab * = 2;
ctcHClrTabsAll * = 5;
(****** TBC parameters ******)
tbcHClrTab * = 0;
tbcHClrTabsAll * = 3;
(****** SM and RM parameters ******)
mLNM * = 20; (* linefeed newline mode *)
mASM * = ">1"; (* auto scroll mode *)
mAWM * = "?7"; (* auto wrap mode *)
(**-- Device base variable----------------------------------------------*)
CONST
consoleName * = "console.device";
VAR
base * : e.DevicePtr;
(**-- Device functions -------------------------------------------------*)
(*
** $VER: console_protos.h 36.6 (7.11.90)
*)
PROCEDURE CDInputHandler* [base,-42]
( events [8] : ie.InputEventDummyPtr;
consoleDevice [9] : e.LibraryBasePtr )
: ie.InputEventDummyPtr;
PROCEDURE RawKeyConvert* [base,-48]
( events [8] : ie.InputEventDummyPtr;
VAR buffer [9] : ARRAY OF SYS.BYTE;
length [1] : LONGINT;
keyMap [10] : km.KeyMapPtr )
: LONGINT;
(*--- functions in V36 or higher (Release 2.0) ---*)
PROCEDURE GetConSnip * [base,-54] ()
: LONGINT;
PROCEDURE SetConSnip * [base,-60]
( snip [8] : LONGINT);
PROCEDURE AddConSnipHook * [base,-66]
( hook [8] : u.HookBasePtr );
PROCEDURE RemConSnipHook * [base,-72]
( hook [8] : u.HookBasePtr );
BEGIN base := NIL
END Console.